<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>@yield('title')-教职工</title>
    <link rel="stylesheet" href="{{  asset('/crm/js/layui/css/layui.css') }}">
    <link rel="stylesheet" href="{{  asset('/crm/css/common.css') }}">
    <link rel="stylesheet" href="{{  asset('/crm/css/main.css') }}">
    @yield('header')
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <!-- 头部 -->
    <div class="layui-header c-header">
        <span class='icon-menu'></span>
        <div class="layui-logo c-logo">教职工管理系统</div>
        <!-- 头部区域 -->
        <span class='head-line-1'></span>
        <span class='logo-ps'>科讯软件</span>
        <ul class="layui-nav layui-layout-right nav-user">
            <li class="layui-nav-item">
                <a href="javascript:;" class='username'>
                    <img src="http://t.cn/RCzsdCq" class="layui-nav-img"></a>
            </li>
            <span class='l-line'>|</span>
            <li class="layui-nav-item layui-nav-item-setting user-setting-btn">
                <span class='icon-setting'></span>
            </li>
            <span class='l-line'>|</span>
            <li class="layui-nav-item layui-nav-item-close sign-out-btn">
                <span class='icon-close'></span>
            </li>
        </ul>
    </div>

    <!-- 主菜单列表 -->
    <div class='c-main-menu-box'>
        <ul>
            @foreach($menu as $k=>$v)
                <li class="{{ isset($v['cur']) ? 'cur' : '' }}">
                    <span class='menu-icon icon-1'></span>
                    <span class='text'>{{ $v['menu_name'] }}</span>
                </li>
            @endforeach
        </ul>
    </div>


    <div class="layui-side layui-bg-black">
        <div class="layui-side-scroll">
            <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
            <div class="layui-collapse" lay-accordion>
                @foreach($menu as $k=>$v)
                    @if(isset($v['small']))
                        @foreach($v['small'] as $k1=>$v1)
                            <div class="layui-colla-item">
                                <h2 class="layui-colla-title">{{ $v1['menu_name'] }}</h2>
                                <div class="layui-colla-content layui-show">
                                    <ul>
                                        @if(isset($v1['small']))
                                            @foreach($v1['small'] as $k2=>$v2)
                                                <li class="{{ isset($v2['cur']) ? 'cur' : '' }}">{{ $v2['menu_name'] }}</li>
                                            @endforeach
                                        @endif
                                    </ul>
                                </div>
                            </div>
                        @endforeach
                    @endif
                @endforeach
            </div>
        </div>
    </div>

    <div class="layui-body">

        <div style="padding: 15px;">
            <!-- 面包屑   -->
            @yield('navbread')
            <span class="layui-breadcrumb" lay-separator=">">
              <a href="">当前位置</a>
                @if(isset($navbread))
                    @foreach($navbread as $k=>$v)
                      <a href="{{ $v['href'] }}">{{ $v['name'] }}</a>
                    @endforeach
                @endif
            </span>
        @yield('body')
        </div>
    </div>

    <!-- 修改密码 -->
    <script id='setting_passwd_box_layer' type='text'>
  <div class='setting-passwd-box-layer'>
    <div style='text-align:center;margin:20px 0;'>
      <label style='display:inline-block;width:120px;text-align:left;' for="">原密码：</label>
      <input style='margin-left:10px;padding:5px 10px;' type="password" name="old_pass" required  lay-verify="required" placeholder="请输入原密码" autocomplete="false">
    </div>
    <div style='text-align:center;margin:20px 0;'>
      <label style='display:inline-block;width:120px;text-align:left;' for="">新密码：</label>
      <input style='margin-left:10px;padding:5px 10px;' type="password" name="new_pass" required  lay-verify="required" placeholder="请输入新密码" autocomplete="false">
    </div>
    <div style='text-align:center;margin:20px 0;'>
      <label style='display:inline-block;width:120px;text-align:left;' for="">确认新密码：</label>
      <input style='margin-left:10px;padding:5px 10px;' type="password" name="re_pass" required  lay-verify="required" placeholder="请再次输入新密码" autocomplete="false">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
    </div>
  </div>
</script>


    <!-- 退出 -->
    <script id='close_layer_box' type='text'>
<div class='close-layer-box'>
  <p style='text-align:center;padding:45px;'>是否确认退出？</p>
</div>
@yield('footer')
</script>


    <script src="{{ asset('/crm/js/layui/layui.all.js') }}"></script>
    <script src="{{ asset('/crm/js/jquery-3.2.1.min.js') }}"></script>
    <script src="{{ asset('/crm/js/jq_extend.js') }}"></script>
    <script src="{{ asset('/crm/js/main.js') }}"></script>
    <script>
        //JavaScript代码区域
        layui.use('element', function(){
            var element = layui.element;
            //执行实例
        });
        layui.use('upload', function(){
            var upload = layui.upload;

            //执行实例
            var uploadInst = upload.render({
                elem: '#upload_img' //绑定元素
                ,url: '/' //上传接口
                ,done: function(res){
                    //上传完毕回调
                }
                ,error: function(){
                    //请求异常回调
                }
            });
        });
        main.staffInfo.init();
    </script>
</body>
</html>